<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <script src="./评论列表-素材/lib/china.js"></script>
    <style>
         #box{
           margin: 0px auto;
        }
    </style>
</head>
<body>
        <div id="box" style="width: 1200px; height: 1000px;"></div>
 <script>
    const dom = document.querySelector('#box')
    const myEchart = echarts.init(dom)
    const dataList = [
      { name: '南海诸岛', value: 20 },
      { name: '北京', value: 30 },
      { name: '天津', value: 20 },
      { name: '上海', value: 10 },
      { name: '重庆', value:30 },
      { name: '河北', value: 30 },
      { name: '河南', value: 40 },
      { name: '云南', value:50 },
      { name: '辽宁', value: 80 },
      { name: '黑龙江', value:70 },
      { name: '湖南', value: 70 },
      { name: '安徽', value: 70 },
      { name: '山东', value: 50 },
      { name: '新疆', value: 30 },
      { name: '江苏', value: 20 },
      { name: '浙江', value: 20 },
      { name: '江西', value: 20 },
      { name: '湖北', value: 20 },
      { name: '广西', value: 50 },
      { name: '甘肃', value: 30 },
      { name: '山西', value: 40 },
      { name: '内蒙古', value:50 },
      { name: '陕西', value: 40 },
      { name: '吉林', value: 40 },
      { name: '福建', value: 40 },
      { name: '贵州', value: 30 },
      { name: '广东', value: 90 },
      { name: '青海', value: 20 },
      { name: '西藏', value: 90 },
      { name: '四川', value: 10 },
      { name: '宁夏', value: 13 },
      { name: '海南', value: 19 },
      { name: '台湾', value: 18 },
      { name: '香港', value:22},
      { name: '澳门', value:36 },
    ]
  
    const option = {
      title: {
        text: '籍贯分布',
        top: 50,
        left: 150,
        textStyle: {
          fontSize: 16,
        },
      },
      tooltip: {
        trigger: 'item',
        formatter: '{b}: {c} 位学员',
        borderColor: 'transparent',
        backgroundColor: 'rgba(0,0,0,0.5)',
        textStyle: {
          color: '#fff',
        },
      },
      visualMap: {
        min: 0,
        max: 100,
        left: 'left',
        bottom: '20',
        text: ['100', '0'],
        inRange: { // 颜色
          color: ['#ffffff', '#0075F0'],
        },
        show: true,
        left: 40,
      },
      geo: {
        map: 'china',
        roam: false,
        zoom: 1.0,
        label: {
          normal: {
            show: true,
            fontSize: '10',
            color: 'rgba(0,0,0,0.7)',
          },
        },
        itemStyle: {
          normal: {
            borderColor: 'rgba(0, 0, 0, 0.2)',
            color: '#e0ffff',
          },
          emphasis: {
            areaColor: '#34D39A',
            shadowOffsetX: 0,
            shadowOffsetY: 0,
            shadowBlur: 20,
            borderWidth: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)',
          },
        },
      },
      series: [
        {
          name: '籍贯分布',
          type: 'map',
          geoIndex: 0,
          data: dataList,
        },
      ],
    }
    myEchart.setOption(option)
  

        </script>
    </body>
    

</html>